<?php
class Usuarios_Model_DbTable_Rolesusuarios extends Zend_Db_Table_Abstract {
	/** Table name */
	protected $_name = 'rolesusuarios';
	
	public function getArrayCountUsuariosPorRol() {
		//		$sql="SELECT codrol,COUNT(*) as cantidad FROM rolesusuarios GROUP BY codrol";
		$columns = array ("codrol", "cantidad" => "COUNT(*)" );
		$select = $this->select ()->from ( 'rolesusuarios', $columns )->group ( "codrol" );
		return $select->query ()->fetchAll ();
	}
}